home *** CD-ROM | disk | FTP | other *** search
/ Immoral Angel 1 / Immoral Angel 1.iso / pc / program / main.dxr / 00120.ls < prev    next >
Encoding:
Text File  |  1997-07-11  |  2.7 KB  |  126 lines

  1. on startMovie
  2.   global packagenum, runstatus, wallname, mouseposition, fileName, cursorpointer
  3.   setcursor()
  4.   cursor(cursorpointer)
  5.   setsaverfirst()
  6.   setbeepfirst()
  7.   set packagenum to "0"
  8.   set runstatus to "quit"
  9.   set wallname to "CINE"
  10.   set mouseposition to mouseH() & "," & mouseV()
  11.   set fileName to "MAIN"
  12. end
  13.  
  14. on setsaverfirst
  15.   global saveronoff, savertime
  16.   clearchecksavertime()
  17.   if saveronoff then
  18.     set the hilite of cast "SaverOn" to 1
  19.     set the hilite of cast "SaverOff" to 0
  20.   else
  21.     set the hilite of cast "SaverOn" to 0
  22.     set the hilite of cast "SaverOff" to 1
  23.   end if
  24.   if savertime = 2 then
  25.     set the hilite of cast "saver2min" to 1
  26.   else
  27.     if savertime = 3 then
  28.       set the hilite of cast "saver3min" to 1
  29.     else
  30.       if savertime = 5 then
  31.         set the hilite of cast "saver5min" to 1
  32.       end if
  33.     end if
  34.   end if
  35. end
  36.  
  37. on setbeepfirst
  38.   global bgmonoff, beepnum
  39.   clearcheckbeep()
  40.   if bgmonoff = "pi" then
  41.     set the hilite of cast "bgmOnOff" to 1
  42.   else
  43.     set the hilite of cast "bgmOnOff" to 0
  44.   end if
  45.   if beepnum = 1 then
  46.     set the hilite of cast "beep1" to 1
  47.   else
  48.     if beepnum = 2 then
  49.       set the hilite of cast "beep2" to 1
  50.     else
  51.       if beepnum = 3 then
  52.         set the hilite of cast "beep3" to 1
  53.       else
  54.         if beepnum = 4 then
  55.           set the hilite of cast "beep4" to 1
  56.         end if
  57.       end if
  58.     end if
  59.   end if
  60. end
  61.  
  62. on button
  63.   global bgmonoff
  64.   set buttonname to item 1 of the name of cast the castNum of sprite clickOn()
  65.   repeat while stillDown()
  66.     if rollOver(clickOn()) then
  67.       set the castNum of sprite clickOn() to the number of member (buttonname & ",down")
  68.     else
  69.       set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  70.     end if
  71.     updateStage()
  72.   end repeat
  73.   set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  74.   updateStage()
  75.   if rollOver(clickOn()) then
  76.     puppetSound(bgmonoff)
  77.     updateStage()
  78.     return 1
  79.   else
  80.     return 0
  81.   end if
  82. end
  83.  
  84. on checktrush
  85.   global framenum, dialogboxopen
  86.   set framenum to the frame
  87.   if sprite 2 intersects 6 then
  88.     if mouseUp() then
  89.       if dialogboxopen then
  90.         go("exitAlart3")
  91.       else
  92.         go("exitAlart4")
  93.       end if
  94.       beepsound()
  95.     end if
  96.   end if
  97. end
  98.  
  99. on beepsound
  100.   global bgmonoff, beepnum
  101.   puppetSound(string(beepnum))
  102.   updateStage()
  103. end
  104.  
  105. on wait t
  106.   set waittime to ticks() + (t * 60)
  107.   repeat while ticks() < waittime
  108.     nothing()
  109.   end repeat
  110. end
  111.  
  112. on idle
  113.   global startTime, fileName
  114.   checktimeout()
  115.   if fileName = "MAIN" then
  116.     exit
  117.   end if
  118.   set runningtime to ticks() - startTime
  119.   if runningtime > (5 * 60 * 60) then
  120.     set startTime to ticks()
  121.     if random(10) = 5 then
  122.       bomb()
  123.     end if
  124.   end if
  125. end
  126.